<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<script type="text/javascript" src="lib/PIE_IE678.js"></script>
<![endif]-->
<link href="__PUBLIC__/Admin/css/H-ui.min.css" rel="stylesheet" type="text/css" />
<link href="__PUBLIC__/Admin/css/H-ui.login.css" rel="stylesheet" type="text/css" />
<link href="__PUBLIC__/Admin/css/style.css" rel="stylesheet" type="text/css" />
<link href="__PUBLIC__/Admin/lib/font-awesome/font-awesome.min.css" rel="stylesheet" type="text/css" />
<!--[if IE 7]>
<link href="lib/font-awesome/font-awesome-ie7.min.css" rel="stylesheet" type="text/css" />
<![endif]-->
<link href="__PUBLIC__/Admin/lib/iconfont/iconfont.css" rel="stylesheet" type="text/css" />
<!--[if IE 6]>
<script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<title>ZTQ后台登录 BBS</title>
<meta name="keywords" content="我的项目">
<meta name="description" content="我的项目">
</head>
<body>
<input type="hidden" id="TenantId" name="TenantId" value="" />
<div class="header">ZTQ后台登录 BBS</div>
<div class="loginWraper">
  <div id="loginform" class="loginBox">
    <form class="form form-horizontal" action="{:U('admin/login/login')}" method="post">
      <div class="row cl">
        <label class="form-label col-3"><i class="iconfont">&#xf00ec;</i></label>
        <div class="formControls col-8">
          <input id="email" name="email" type="text" placeholder="账户" class="input-text size-L">
          <span class="notice1"></span>
        </div>
      </div>
      <div class="row cl">
        <label class="form-label col-3"><i class="iconfont">&#xf00c9;</i></label>
        <div class="formControls col-8">
          <input id="password" name="password" type="password" placeholder="密码" class="input-text size-L">
          <span class="notice2"></span>
        </div>
      </div>
      <div class="row cl">
        <div class="formControls col-8 col-offset-3">
          <input class="input-text size-L" id="captcha" type="text" placeholder="验证码" onblur="if(this.value==''){this.value='验证码:'}" onclick="if(this.value=='验证码:'){this.value='';}" value="验证码:" style="width:150px;">
          <img id="change_code" src="{:U('admin/login/captcha')}"> 
          <a id="kanbuq" href="javascript:;">看不清，换一张</a>
          <span class="notice3"></span> 
        </div>
      </div>
      <div class="row">
        <div class="formControls col-8 col-offset-3">
          <label for="online">
            <input type="checkbox" name="online" id="online" value="">
            使我保持登录状态</label>
        </div>
      </div>
      <div class="row">
        <div class="formControls col-8 col-offset-3">
          <input name="" type="submit" class="btn btn-success radius size-L" value="&nbsp;登&nbsp;&nbsp;&nbsp;&nbsp;录&nbsp;">
          <input name="" type="reset" class="btn btn-default radius size-L" value="&nbsp;取&nbsp;&nbsp;&nbsp;&nbsp;消&nbsp;">
        </div>
      </div>
    </form>
  </div>
</div>
<div class="footer">Copyright ZTQ by BBS</div>
<script type="text/javascript" src="__PUBLIC__/Admin/lib/jquery.min.js"></script> 
<script type="text/javascript" src="__PUBLIC__/Admin/js/H-ui.js"></script> 
<script>
  //验证码点击切换图片
  $('#kanbuq').click(function(event) {
    $('#change_code').attr({
            src: '{: U('admin/login/captcha')}/'+Math.random()
        });
  });

  // 验证登录邮箱
  $('#email').blur(function(event) {
    var email = $(this).val();
    $.ajax({
      url: '{:U('admin/login/checkemail')}',
      type: 'POST',
      dataType: 'json',
      data: {email: email},
    })
    .done(function(data) {
      if (data=='1') {
        $('.notice1').html(data.info);
      }else{
        $('.notice1').html(data.info);
      }
    })    
  });

  //验证码
  $('#captcha').blur(function(event) {
    var captcha = $(this).val();
    $.ajax({
      url: '{:U('admin/login/checkcaptcha')}',
      type: 'POST',
      dataType: 'json',
      data: {captcha: captcha},
    })
    .done(function(data) {
      if(data == '1'){
        $('.notice3').html('验证码正确');
      }else{
        $('.notice3').html('验证码错误');
      }
    })    
  });


</script>
</body>
</html>